|
NcApi
|
The application layer interfaces with the node through the API when payload data is being transmitted or received. The API implements handles for encoding/decoding and synchronisation of the data transfer to and from the node.
For further information, please also refer to the documents on NeoCortec's download page:
neocortec.com/downloads/
The Application using the API typically resides in a microcontroller which communicates with the NeoCortec node through a UART.
Functions for initiating a message to the NeoCortec module by enqueueing it for transmission:
Unfortunately the links in the sequence diagram does not work in the PDF version of the documentation, and hence links to the functions are provided here:
Functions related to the actual transmission of a message to the NeoCortec module as response to the CTS signal:
NcApiSupportTxData() will be called if there is a pending enqueued message when NcApiCtsActive() is called.
Please also refer to the section "Interface between the API and the CTS part of the API Support".
Unfortunately the links in the sequence diagram does not work in the PDF version of the documentation, and hence links to the functions are provided here:
Function to inform the API that the NeoCortec module is ready to receive messages:
If there is a pending enqueued message the API will call NcApiSupportTxData(), and when the entire message has been delivered to the UART, NcApiSupportMessageWritten() is called.
Please also refer to the section "Interface between the API and the Tx part of the API Support".
Unfortunately the links in the sequence diagram does not work in the PDF version of the documentation, and hence links to the functions are provided here:
When data is received from the mesh network, a series of call-back functions will call the Application with the received data. Depending on what type of data is received, a type specific call-back is issued. It is optional for the application layer to register for the call-backs.
Call back functions to pass on received messages to the application:
Unfortunately the links in the sequence diagram does not work in the PDF version of the documentation, and hence links to the functions are provided here:
Functions related to reception of messages from the NeoCortec module:
When data is received from the UART, it shall be forwarded to NcApiRxData(). When a complete message has been received, the application will be notified via NcApiSupportMessageReceived().
Unfortunately the links in the sequence diagram does not work in the PDF version of the documentation, and hence links to the functions are provided here:
1.8.10